<template>
<a-breadcrumb :routes="mRoute.matched">
  <template #itemRender="{ route,routes }">
    <span v-if="routes.indexOf(route) === routes.length - 1">
      <MenuIcon v-if="route.meta.icon" :icon="route.meta.icon"/>
      {{ route.meta.title }}
    </span>
    <router-link v-else :to="{name: route.name}">
      <MenuIcon v-if="route.meta.icon" :icon="route.meta.icon"/>
      {{ route.meta.title }}
    </router-link>
  </template>
</a-breadcrumb>
</template>
<script setup lang="ts">
import MenuIcon from './MenuIcon.vue';
import { useRoute } from 'vue-router';
const mRoute = useRoute()
</script>
<style lang="less" scoped>

</style>